// myVue.info.icon = usericon; //头像
// myVue.info.nick = usernick; //昵称
// myVue.info.name = username; //账号
// //获取房间标题
// var title = document.getElementsByClassName('msg-list-row-title')[0];
// //改变房间标题
// myVue.room.title = title.innerHTML;
// //获取房间ID
// var rid = document.getElementsByClassName('room-id')[0].innerHTML;
// //改变房间ID
// myVue.room.room = rid;

var myVue = new Vue({
    el: "#app",
    data() {
        return {
            room: {
                title: window.room_title,
                room: window.room_id, //房间号
                passwd: '',
                passwds: '',
                edit: false
            },
            info: {
                icon: window.usericon, //头像
                nick: window.usernick, //昵称
                name: window.username, //账号
            },
            user: {
                uid: '123',
                visit: '12345',
                form: '广西',
            },
            chatData: [],
        }
    },
    computed: {
        //消息时间差，超过180秒，则显示消息发送时间
        Long: function () {
            return function (index) {
                if (index > 0) {
                    var prveTime1 = this.chatData[index - 1].time.slice(0, 10);
                    var prveTime2 = this.chatData[index - 1].time.slice(15);
                    var prveTime = prveTime1 + ' ' + prveTime2

                    var nowTime1 = this.chatData[index].time.slice(0, 10);
                    var nowTime2 = this.chatData[index].time.slice(15);
                    var nowTime = nowTime1 + ' ' + nowTime2

                    var d1 = new Date(prveTime);
                    var d2 = new Date(nowTime);

                    var longTime = parseInt(d2 - d1) / 1000;

                    if (longTime > 180) {
                        return true;
                    } else {
                        return false;
                    }
                }
            };
        },
        //判断消息类型是 客服-文本
        SupportText: function () {
            return function (index) {
                if (this.chatData[index].user == "support" && this.chatData[index].type == "text") {
                    return true;
                } else {
                    return false;
                }
            }
        },
        //判断消息类型是 客服-图片
        SupportPic: function () {
            return function (index) {
                if (this.chatData[index].user == "support" && this.chatData[index].type == "pic") {
                    return true;
                } else {
                    return false;
                }
            }
        },
        //判断消息类型是 游客-文本
        VisitorText: function () {
            return function (index) {
                if (this.chatData[index].user == "visitor" && this.chatData[index].type == "text") {
                    return true;
                } else {
                    return false;
                }
            }
        },
        //判断消息类型是 游客-图片
        VisitorPic: function () {
            return function (index) {
                if (this.chatData[index].user == "visitor" && this.chatData[index].type == "pic") {
                    return true;
                } else {
                    return false;
                }
            }
        },
    },
    methods: {
        editroom() {
            layer.open({
                type: 2,
                title: '房间编辑',
                shadeClose: true,
                shade: 0.8,
                area: [window.tcsize('w'), window.tcsize('h')],
                content: '/editroom.html?id=' + myVue.room.room //iframe的url
            });
        },
        Send() {
            var inputInfo = editor.txt.html();
            if (inputInfo != "<p><br></p>") {
                //进入客服页面提示.
                var newInfo = JSON.stringify({
                    "icon": this.info.icon, //头像
                    "nick": this.info.nick, //昵称
                    "name": this.info.name, //账号
                    "room": this.room.room, //房间号
                    "content": inputInfo, //内容
                    "type": "text", //消息类型
                    "pass": myVue.room.passwds
                });
                console.log(myVue.room.passwd);

                // ws.send(newInfo);
                if (newInfo.length < 52000) {
                    ws.send(newInfo);
                    editor.txt.html(''); //清空输入框
                } else {
                    layer.msg("消息内容超出最大限制！")
                }
                GoBottom(); //跳到最新消息
            };
        },
        GetNowTime() {
            //判断是否在前面加0
            function getNow(s) {
                return s < 10 ? '0' + s : s;
            }

            var myDate = new Date();

            var year = myDate.getFullYear(); //获取当前年
            var month = myDate.getMonth() + 1; //获取当前月
            var date = myDate.getDate(); //获取当前日

            var str = "星期" + "日一二三四五六".charAt(new Date().getDay());

            var h = myDate.getHours(); //获取当前小时数(0-23)
            var m = myDate.getMinutes(); //获取当前分钟数(0-59)
            var s = myDate.getSeconds();

            var now = year + '/' + getNow(month) + "/" + getNow(date) + " " + str + " " + getNow(h) + ':' + getNow(m) + ":" + getNow(s);

            return now;
        }
    },
})


/**富文本编辑器 开始 */
var E = window.wangEditor
var editor = new E('#editor')
editor.customConfig.menus = [
    'emoticon', // 表情
    'image', // 插入图片
    'undo', // 撤销
    'redo' // 重复
]
editor.customConfig.pasteFilterStyle = false; // 关闭粘贴内容中的样式
editor.customConfig.uploadImgShowBase64 = true; // 使用 base64 保存图片

editor.customConfig.customUploadImg = function (files, insert) {
    var imgSize = (files[0].size / 1024).toFixed(0); //选择的图片大小
    var imgBase64;

    if (imgSize > 128) {
        alert('图片大小超出128KB限制');
        return false;
    } else {
        var file = files[0];
        if (window.FileReader) {
            var reader = new FileReader();
            reader.readAsDataURL(file);
            //监听文件读取结束后事件    
            reader.onloadend = function (e) {
                imgBase64 = e.target.result; // 图片base64
                sendimg(imgBase64);
            };
        }
    }

    // 上传代码返回结果之后，将图片插入到编辑器中
    // insert(imgUrl);
}

// 表情面板可以有多个 tab ，因此要配置成一个数组。数组每个元素代表一个 tab 的配置
editor.customConfig.emotions = [{
        // tab 的标题
        title: 'emoji',
        // type -> 'emoji' / 'image'
        type: 'image',
        // content -> 数组
        content: [{
                "src": "/assets/home/img/icon/0.png"
            },

        ]
    },
    {
        // tab 的标题
        title: '微博表情',
        // type -> 'emoji' / 'image'
        type: 'image',
        // content -> 数组
        content: [{
                "alt": "[微笑]",
                "src": "/assets/home/img/icon/0.png"
            },
            {
                "alt": "[可爱]",
                "src": "/assets/home/img/icon/1.png"
            },
            {
                "alt": "[太开心]",
                "src": "/assets/home/img/icon/2.png"
            },
            {
                "alt": "[鼓掌]",
                "src": "/assets/home/img/icon/3.png"
            },
            {
                "alt": "[嘻嘻]",
                "src": "/assets/home/img/icon/4.png"
            },
            {
                "alt": "[哈哈]",
                "src": "/assets/home/img/icon/5.png"
            },
            {
                "alt": "[笑cry]",
                "src": "/assets/home/img/icon/6.png"
            },
            {
                "alt": "[挤眼]",
                "src": "/assets/home/img/icon/7.png"
            },
            {
                "alt": "[馋嘴]",
                "src": "/assets/home/img/icon/8.png"
            },
            {
                "alt": "[黑线]",
                "src": "/assets/home/img/icon/9.png"
            },
            {
                "alt": "[汗]",
                "src": "/assets/home/img/icon/10.png"
            },
            {
                "alt": "[挖鼻]",
                "src": "/assets/home/img/icon/11.png"
            },
            {
                "alt": "[哼]",
                "src": "/assets/home/img/icon/12.png"
            },
            {
                "alt": "[怒]",
                "src": "/assets/home/img/icon/13.png"
            },
            {
                "alt": "[委屈]",
                "src": "/assets/home/img/icon/14.png"
            },
            {
                "alt": "[可怜]",
                "src": "/assets/home/img/icon/15.png"
            },
            {
                "alt": "[失望]",
                "src": "/assets/home/img/icon/16.png"
            },
            {
                "alt": "[悲伤]",
                "src": "/assets/home/img/icon/17.png"
            },
            {
                "alt": "[泪]",
                "src": "/assets/home/img/icon/18.png"
            },
            {
                "alt": "[允悲]",
                "src": "/assets/home/img/icon/19.png"
            },
            {
                "alt": "[害羞]",
                "src": "/assets/home/img/icon/20.png"
            },
            {
                "alt": "[污]",
                "src": "/assets/home/img/icon/21.png"
            },
            {
                "alt": "[爱你]",
                "src": "/assets/home/img/icon/22.png"
            },
            {
                "alt": "[亲亲]",
                "src": "/assets/home/img/icon/23.png"
            },
            {
                "alt": "[色]",
                "src": "/assets/home/img/icon/24.png"
            },
            {
                "alt": "[憧憬]",
                "src": "/assets/home/img/icon/25.png"
            },
            {
                "alt": "[舔屏]",
                "src": "/assets/home/img/icon/26.png"
            },
            {
                "alt": "[坏笑]",
                "src": "/assets/home/img/icon/27.png"
            },
            {
                "alt": "[阴险]",
                "src": "/assets/home/img/icon/28.png"
            },
            {
                "alt": "[笑而不语]",
                "src": "/assets/home/img/icon/29.png"
            },
            {
                "alt": "[偷笑]",
                "src": "/assets/home/img/icon/30.png"
            },
            {
                "alt": "[酷]",
                "src": "/assets/home/img/icon/31.png"
            },
            {
                "alt": "[并不简单]",
                "src": "/assets/home/img/icon/32.png"
            },
            {
                "alt": "[思考]",
                "src": "/assets/home/img/icon/33.png"
            },
            {
                "alt": "[疑问]",
                "src": "/assets/home/img/icon/34.png"
            },
            {
                "alt": "[费解]",
                "src": "/assets/home/img/icon/35.png"
            },
            {
                "alt": "[晕]",
                "src": "/assets/home/img/icon/36.png"
            },
            {
                "alt": "[衰]",
                "src": "/assets/home/img/icon/37.png"
            },
            {
                "alt": "[骷髅]",
                "src": "/assets/home/img/icon/38.png"
            },
            {
                "alt": "[嘘]",
                "src": "/assets/home/img/icon/39.png"
            },
            {
                "alt": "[闭嘴]",
                "src": "/assets/home/img/icon/40.png"
            },
            {
                "alt": "[傻眼]",
                "src": "/assets/home/img/icon/41.png"
            },
            {
                "alt": "[吃惊]",
                "src": "/assets/home/img/icon/42.png"
            },
            {
                "alt": "[吐]",
                "src": "/assets/home/img/icon/43.png"
            },
            {
                "alt": "[感冒]",
                "src": "/assets/home/img/icon/44.png"
            },
            {
                "alt": "[生病]",
                "src": "/assets/home/img/icon/45.png"
            },
            {
                "alt": "[拜拜]",
                "src": "/assets/home/img/icon/46.png"
            },
            {
                "alt": "[鄙视]",
                "src": "/assets/home/img/icon/47.png"
            },
            {
                "alt": "[白眼]",
                "src": "/assets/home/img/icon/48.png"
            },
            {
                "alt": "[左哼哼]",
                "src": "/assets/home/img/icon/49.png"
            },
            {
                "alt": "[右哼哼]",
                "src": "/assets/home/img/icon/50.png"
            },
            {
                "alt": "[抓狂]",
                "src": "/assets/home/img/icon/51.png"
            },
            {
                "alt": "[怒骂]",
                "src": "/assets/home/img/icon/52.png"
            },
            {
                "alt": "[打脸]",
                "src": "/assets/home/img/icon/53.png"
            },
            {
                "alt": "[顶]",
                "src": "/assets/home/img/icon/54.png"
            },
            {
                "alt": "[互粉]",
                "src": "/assets/home/img/icon/55.png"
            },
            {
                "alt": "[钱]",
                "src": "/assets/home/img/icon/56.png"
            },
            {
                "alt": "[哈欠]",
                "src": "/assets/home/img/icon/57.png"
            },
            {
                "alt": "[困]",
                "src": "/assets/home/img/icon/58.png"
            },
            {
                "alt": "[睡]",
                "src": "/assets/home/img/icon/59.png"
            },
            {
                "alt": "[吃瓜]",
                "src": "/assets/home/img/icon/60.png"
            },
            {
                "alt": "[doge]",
                "src": "/assets/home/img/icon/61.png"
            },
            {
                "alt": "[二哈]",
                "src": "/assets/home/img/icon/62.png"
            },
            {
                "alt": "[喵喵]",
                "src": "/assets/home/img/icon/63.png"
            },
            {
                "alt": "[赞]",
                "src": "/assets/home/img/icon/64.png"
            },
            {
                "alt": "[good]",
                "src": "/assets/home/img/icon/65.png"
            },
            {
                "alt": "[ok]",
                "src": "/assets/home/img/icon/66.png"
            },
            {
                "alt": "[耶]",
                "src": "/assets/home/img/icon/67.png"
            },
            {
                "alt": "[握手]",
                "src": "/assets/home/img/icon/68.png"
            },
            {
                "alt": "[作揖]",
                "src": "/assets/home/img/icon/69.png"
            },
            {
                "alt": "[来]",
                "src": "/assets/home/img/icon/70.png"
            },
            {
                "alt": "[拳头]",
                "src": "/assets/home/img/icon/71.png"
            },
        ]
    }
]

editor.create();
/**富文本编辑器 结束 */


//通讯开始 创建一个对象
const ws = new WebSocket(`ws://${hostname}:${wsPort}`)

//连接建立时触发
ws.onopen = () => {
    myVue.room.edit = true;
    var rid = document.getElementsByClassName('room-id')[0].innerHTML;
    //获取房间标题
    var title = document.getElementsByClassName('msg-list-row-title')[0];
    //改变房间标题
    myVue.room.title = title.innerHTML;
    //改变房间ID
    myVue.room.room = rid;
    //进入客服页面提示.
    var data = JSON.stringify({
        "room": myVue.room.room, //房间号
        "name": myVue.info.name,
        "nick": myVue.info.nick,
        "pass": myVue.room.passwd
    });
    // ws.send(data);
    if (data.length < 52000) {
        ws.send(data);
    } else {
        layer.msg("消息内容超出最大限制！")
    }
}

var msg_data = '';
var msg_flag = true

function pushdom(da, flag) {

    if (flag != false) {
        msg_data = '';

        //错误返回
        if (da.error) {
            if (myVue.room.room == da.room && username == da.name) {
                if (da.tips == 'pass') {
                    roompaswd();
                }
                layer.msg(da.error);
            }
            return;
        }

        myVue.room.passwd = myVue.room.passwd;

        //判断用户发送
        if (da.list === true) {

            var tipsnews = {
                room: da.room,
                icon: "assets/home/img/tpis.png", //头像
                user: "support",
                time: da.time,
                type: "text",
                nick: "消息助手",
                content: "<p>欢迎 【" + da.nick + "】 进入房间！</p>",
            }
            if (myVue.room.room == da.room && username == da.name) {
                myVue.chatData = [];
                //将数据存入到页面
                myVue.chatData = da.news;
                myVue.room.edit = true;
            }
            if (myVue.room.room == da.room) {
                myVue.chatData.push(tipsnews);
            }
            GoBottom();
            return;
        }

        //图片类型
        if (da.type == 'pic') {
            //判断同源
            if (myVue.info.name == da.name) {
                da.user = 'visitor';
            } else {
                da.user = 'support';
            }
            //判断房间
            if (myVue.room.room == da.room) {
                //将数据存入到页面
                myVue.chatData.push(da);
            }
            GoBottom();
            return;
        }

        if (da.type == 'text') {
            //判断同源
            if (myVue.info.name == da.name) {
                da.user = 'visitor';
            } else {
                da.user = 'support';
            }
            //判断房间
            if (myVue.room.room == da.room) {
                //将数据存入到页面
                myVue.chatData.push(da);
            }
            GoBottom();
            return;
        }

        GoBottom();
    }
}

function sendimg(b64img) {
    var fd = new FormData();
    fd.append('content', b64img);
    $.ajax({
        url: '/user/b64img',
        type: 'POST',
        timeout: 3000,
        dataType: 'JSON',
        contentType: 'application/x-www-form-urlencoded;charset=utf-8',
        data: fd,
        contentType: false, //不设置内容类型
        processData: false, //不处理数据
        success: function (data) {
            if (data.code == 200) {
                var newInfo = JSON.stringify({
                    icon: myVue.info.icon, //头像
                    nick: myVue.info.nick, //昵称
                    name: myVue.info.name, //账号
                    room: myVue.room.room, //房间号
                    type: "pic",
                    time: myVue.GetNowTime(),
                    content: data.data.url,
                    pass: myVue.room.passwd
                });
                // ws.send(newInfo); //发送
                if (newInfo.length < 52000) {
                    ws.send(newInfo);
                } else {
                    layer.msg("消息内容超出最大限制！")
                }
                GoBottom();
            } else {
                layer.msg(data.msg, {
                    time: 3000 //1秒关闭（如果不配置，默认是3秒）
                });
            }
        },
        error: function (XMLResponse) {
            //异常捕获
            layer.msg(XMLResponse.responseText, {
                time: 3000 //1秒关闭（如果不配置，默认是3秒）
            });
        }
    });
}

//客户端接收服务端数据时触发
ws.onmessage = (msg) => {
    //接收数据，然后将数据展示到界面上 
    try {
        data = JSON.parse(msg.data);
        msg_flag = true;
        if (msg_flag != false) {
            pushdom(data, msg_flag);
        }
        msg_data = ''
    } catch (error) {
        msg_data += msg.data;
        try {
            data = JSON.parse(msg_data);
            msg_flag = true;
            if (msg_flag != false) {
                pushdom(data, msg_flag);
            }
            msg_data = ''
        } catch (error) {
            msg_flag = false;
        }
    }
}

//通信发生错误时触发
ws.onerror = (error) => {
    console.log(error)
    layer.msg("未检测到通讯服务端，请联系管理员打开！")
}

//连接关闭时触发
ws.onclose = () => {
    console.log('closed')

    /*layer.confirm('通讯服务失去连接！', {
        title: '提示',
        btn: ['刷新', '取消'] //按钮
    }, function () {
        //提示层
        layer.msg('开始刷新', {
                time: 1000, //1秒关闭（如果不配置，默认是3秒）
            },
            function () {
                // location.replace('login.html');
                parent.location.reload();
            });
    }, function () {
        //提示层
        // layer.msg('取消退出');
    });
    // layer.msg("失去连接！")*/
}


// 跳转到最新消息
function GoBottom() {
    var scrollHeight = $('#chat-main').prop("scrollHeight");
    $('#chat-main').animate({
        scrollTop: scrollHeight * myVue.chatData.length
    }, 400);
}

$('.w-e-icon-image').parent().click(function () {
    var imgInput = $('.w-e-up-img-container>div:nth-child(2)>input');
    imgInputId = '#' + imgInput[0].id;
    imgInput.removeAttr('multiple'); //禁止多选图片
})

$(document).ready(function () {
    var scrollHeight = $('#chat-main').prop("scrollHeight");
    $('#chat-main').animate({
        scrollTop: scrollHeight * 20
    }, 1);
})


//实时获取屏幕尺寸
function getscreensize(val) {
    window.οnresize = function () {
        $(window).width();
    }

    var offsetWid = document.documentElement.clientWidth;
    var offsetHei = document.documentElement.clientHeight;

    if (/(Android)/i.test(navigator.userAgent)) { // 判断是否为Android手机
        offsetWid = screen.width;
        offsetHei = screen.height;
    } else if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) { // 判断是否为苹果手机
        offsetWid = document.documentElement.clientWidth;
        offsetHei = document.documentElement.clientHeight;
    }

    if (val == 'h') {
        return offsetHei;
    } else {
        return offsetWid;
    }
}

//弹窗尺寸
function tcsize(val) {
    if (val == 'w') {
        if (Number(getscreensize('w')) > 600) {
            return '500px';
        } else {
            return '100%';
        }
    } else {
        if (Number(getscreensize('h')) > 700) {
            return '80%';
        } else {
            return '100%';
        }
    }
}

//弹窗尺寸
function tcsize2(val) {
    if (val == 'w') {
        if (Number(getscreensize('w')) > 600) {
            return '682px';
        } else {
            return '371px';
        }
    } else {
        if (Number(getscreensize('h')) > 700) {
            return '682px';
        } else {
            return '86vh';
        }
    }
}

////iframe层 个人信息
$('#msg-top-icon').click(function () {
    layer.open({
        type: 2,
        title: '我的',
        shadeClose: true,
        shade: 0.8,
        area: [tcsize('w'), tcsize('h')],
        content: '/userinfo.html' //iframe的url
    });
});

//iframe层 创建房间
$('#msg-search-add').click(function () {
    layer.open({
        type: 2,
        title: '创建新房间',
        shadeClose: true,
        shade: 0.8,
        area: [tcsize('w'), tcsize('h')],
        content: '/creator.html' //iframe的url
    });
});

// //iframe层 修改房间
// $('#edit-room').click(function () {
//     layer.open({
//         type: 2,
//         title: '房间编辑',
//         shadeClose: true,
//         shade: 0.8,
//         area: [tcsize('w'), tcsize('h')],
//         content: '/editroom.html?id=' + myVue.room.room //iframe的url
//     });
// });

//返回
$('#msg-return').click(function () {
    msgreturn();
});

//退出
$('#signout').click(function () {
    //询问框

    layer.confirm('是否退出当前账号？', {
        title: '提示',
        btn: ['退出', '取消'] //按钮
    }, function () {
        //提示层
        layer.msg('退出成功', {
                time: 1500, //2秒关闭（如果不配置，默认是3秒）
            },
            function () {
                location.replace('login.html');
            });
    }, function () {
        //提示层
        // layer.msg('取消退出');
    });

});

// 点击进入
function msgclick(row) {
    myVue.room.edit = false;
    //获取房间标题
    var title = row.getElementsByClassName('msg-list-row-title')[0];
    //改变房间标题
    myVue.room.title = title.innerHTML;
    //获取房间ID
    var rid = row.getElementsByClassName('room-id')[0].innerHTML;
    //改变房间ID
    myVue.room.room = rid;
    myVue.room.passwds = '';

    //显示返回
    $('#msg-return').css('display', 'block');
    //隐藏搜索
    $("#msg-search").css("display", "none");
    //隐藏列表
    $("#msg-list-box").css("display", "none");
    //显示聊天窗
    $("#msg-chat-box").addClass("msg-chat-box-show");

    //初始化房间消息
    myVue.chatData = [];

    //进入页面提示.
    var data = JSON.stringify({
        "room": myVue.room.room, //房间号
        "name": myVue.info.name,
        "nick": myVue.info.nick,
        "pass": myVue.room.passwd
    });

    if (data.length < 52000) {
        ws.send(data);
    } else {
        layer.msg("消息内容超出最大限制！")
    }

}

//返回
function msgreturn() {
    $("#msg-search").css("display", "block");
    $("#msg-list-box").css("display", "block");
    // $("#msg-chat-box").css("display", "block");
    $("#msg-chat-box").removeClass("msg-chat-box-show");
    //隐藏返回
    $('#msg-return').css('display', 'none');
}

//查信息
function chainfo(dom) {
    var name = dom.getElementsByTagName('img')[0].alt;
    //自定页
    layer.open({
        title: "用户信息",
        type: 2,
        skin: 'layui-layer-demo', //样式类名
        closeBtn: 0, //不显示关闭按钮
        anim: 4,
        area: ['340px', '280px'], //宽高
        shadeClose: true, //开启遮罩关闭
        content: ['/user/info.html?name=' + name + "&room=" + myVue.room.room] //数组第二项即吸附元素选择器或者DOM
    });
}

//签到
function qiandao() {
    //自定页
    layer.open({
        title: false,
        type: 2,
        skin: 'layui-layer-demo2', //样式类名
        closeBtn: 0, //不显示关闭按钮
        anim: 4,
        area: [tcsize2('w'), tcsize2('h')], //宽高
        shadeClose: true, //开启遮罩关闭
        content: ['/user/signin?name=' + myVue.info.name] //数组第二项即吸附元素选择器或者DOM
    });
}

//密码验证
function roompaswd() {
    //prompt层
    layer.prompt({
        title: '请输入房间密码',
        formType: 1
    }, function (pass, index) {
        myVue.room.passwds = pass;
        console.log(pass);
        var data = JSON.stringify({
            "room": myVue.room.room, //房间号
            "name": myVue.info.name,
            "nick": myVue.info.nick,
            "pass": pass
        });
        if (data.length < 52000) {
            ws.send(data);
        } else {
            layer.msg("消息内容超出最大限制！")
        }
        layer.close(index);
    });
}



function qdData() {
    var qdpreDate = new Date(localStorage.getItem('chatQiandaoTime'));
    if (qdpreDate == null) {
        localStorage.setItem('chatQiandaoTime', new Date())
        qdpreDate = new Date(localStorage.getItem('chatQiandaoTime'));
    }
    var dateTime = new Date();
    if (qdpreDate.getDate() < dateTime.getDate()) {
        return true;
    }
}



if (qdData() === true) {
    qiandao();
}

GoBottom();
